import requests from '@/utils/request';
// 查询
export const reqGetMenuList = (params) =>
  requests.post('/admin/menu/query', params);
// 获取菜单树结构
export const reqQueryMenuTree = () => requests.get('/admin/menu/queryMenuTree');
export const reqQueryMenu = () => requests.get('/admin/menu/queryMenu');
// 菜单新增
export const reqBatchAddMenu = (params) =>
  requests.post('/admin/menu/add', params);
// 菜单编辑
export const reqEditMenu = (params) => requests.put('/admin/menu/edit', params);
// 菜单删除--批量
export const reqBatchDelMenu = (params) =>
  requests.post('/admin/menu/remove', params);
// 根据用户角色返回菜单列表
export const reqQueryMenuListByRole = () =>
  requests.get('/admin/menu/queryMenuListByRole');
// 返回当前菜单的子菜单的最大可用编号
export const reqQueryChildrenMenuMaxId = (params) =>
  requests.get(`/admin/menu/queryChildrenMenuMaxId/${params}`);
// 判断输入的根级菜单编号是否存在
export const reqCheckMenuIdIsExisting = (params) =>
  requests.get(`/admin/menu/checkMenuIdIsExisting/${params}`);
// 判断菜单标题是否重复
export const reqCheckIsRepeatForMenuTitle = (params) =>
  requests.get(`/admin/menu/checkIsRepeatForMenuTitle/${params}`);
